/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* 表单样式 */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.auth-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

/* 消息提示 */
.flash-messages {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 5px;
}

.flash-success {
    background-color: #dff0d8;
    color: #3c763d;
}

.flash-error {
    background-color: #f2dede;
    color: #a94442;
}

.flash-warning {
    background-color: #fcf8e3;
    color: #8a6d3b;
}

/* 分隔线 */
.separator {
    margin: 2rem 0;
    text-align: center;
    position: relative;
}

.separator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #ddd;
    z-index: 1;
}

.separator span {
    position: relative;
    z-index: 2;
    padding: 0 1rem;
    background-color: white;
    color: #777;
}

/* 仪表盘样式 */
.dashboard {
    padding: 2rem 0;
}

.storage-info {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.storage-bar-container {
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    margin: 0.8rem 0;
    overflow: hidden;
}

.storage-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.storage-bar.normal {
    background-color: #2ecc71;
}

.storage-bar.warning {
    background-color: #f39c12;
}

.storage-bar.danger {
    background-color: #e74c3c;
}

.storage-text {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
}

/* 上传区域 */
.upload-area {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 2px dashed #ddd;
    transition: border-color 0.3s;
}

.upload-area:hover {
    border-color: #3498db;
}

.upload-form {
    margin-top: 1rem;
}

/* 搜索栏 */
.search-bar {
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-btn {
    border-radius: 0 5px 5px 0;
}

/* 文件列表 */
.files-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.section-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.2rem;
    color: #2c3e50;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th,
.file-table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.file-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #eee;
}

.file-table tr {
    border-bottom: 1px solid #f1f1f1;
}

.file-table tr:hover {
    background-color: #f9f9f9;
}

.file-icon {
    margin-right: 0.5rem;
    color: #3498db;
}

.action-btn {
    padding: 0.4rem 0.8rem;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* 管理员页面 */
.admin-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .file-table th:nth-child(3),
    .file-table td:nth-child(3) {
        display: none;
    }
    
    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3) {
        display: none;
    }
}